using UnityEngine;

namespace Coffee.UIExtensions
{
    // [Assembly-CSharp.dll].Coffee.UIExtensions.UIGradient
    public class UIGradient : BaseMeshEffect
    {
        
        #region Coffee.UIExtensions.UIGradient.Direction
        // [Assembly-CSharp.dll].Coffee.UIExtensions.UIGradient.Direction
        public enum Direction
        {
            // Fields
            Horizontal = 0
            ,Vertical = 1
            ,Angle = 2
            ,Diagonal = 3
            
        
        }
        
        #endregion
        
        
        #region Coffee.UIExtensions.UIGradient.GradientStyle
        // [Assembly-CSharp.dll].Coffee.UIExtensions.UIGradient.GradientStyle
        public enum GradientStyle
        {
            // Fields
            Rect = 0
            ,Fit = 1
            ,Split = 2
            
        
        }
        
        #endregion
        
        
        #region Coffee.UIExtensions.UIGradient.Matrix2x3
        // [Assembly-CSharp.dll].Coffee.UIExtensions.UIGradient.Matrix2x3
        private struct Matrix2x3
        {
            // Fields
            public float m00;
            public float m01;
            public float m02;
            public float m10;
            public float m11;
            public float m12;
            
            // Methods
            public Matrix2x3(UnityEngine.Rect rect, float cos, float sin)
            {
                float val_2 = rect.m_XMin.width;
                val_2 = rect.m_XMin.xMin / val_2;
                float val_3 = (-0.5f) - val_2;
                float val_15 = rect.m_XMin.yMin;
                float val_5 = rect.m_XMin.height;
                val_5 = val_15 / val_5;
                val_15 = (-0.5f) - val_5;
                float val_6 = rect.m_XMin.width;
                val_6 = cos / val_6;
                this = val_6;
                float val_7 = rect.m_XMin.height;
                val_7 = (-sin) / val_7;
                float val_10 = (val_3 * cos) - (val_15 * sin);
                val_10 = val_10 + 0.5f;
                this.m01 = val_7;
                this.m02 = val_10;
                float val_11 = rect.m_XMin.width;
                val_11 = sin / val_11;
                this.m10 = val_11;
                float val_12 = rect.m_XMin.height;
                float val_13 = val_3 * sin;
                val_13 = val_13 + (val_15 * cos);
                val_12 = cos / val_12;
                val_13 = val_13 + 0.5f;
                this.m11 = val_12;
                this.m12 = val_13;
            }
            public static UnityEngine.Vector2 op_Multiply(Coffee.UIExtensions.UIGradient.Matrix2x3 m, UnityEngine.Vector2 v)
            {
                float val_4 = m.m00;
                float val_5 = m.m01;
                val_4 = S0 * val_4;
                val_5 = S1 * val_5;
                float val_2 = S1 * m.m11;
                val_4 = val_4 + val_5;
                val_2 = (S0 * m.m10) + val_2;
                float val_3 = m.m02 + val_4;
                val_2 = m.m12 + val_2;
                return (UnityEngine.Vector2)m;
            }
        
        }
        
        #endregion
        
        // Fields
        private Coffee.UIExtensions.UIGradient.Direction m_Direction;
        private UnityEngine.Color m_Color1;
        private UnityEngine.Color m_Color2;
        private UnityEngine.Color m_Color3;
        private UnityEngine.Color m_Color4;
        private float m_Rotation;
        private float m_Offset1;
        private float m_Offset2;
        private Coffee.UIExtensions.UIGradient.GradientStyle m_GradientStyle;
        private UnityEngine.ColorSpace m_ColorSpace;
        private bool m_IgnoreAspectRatio;
        private static readonly UnityEngine.Vector2[] s_SplitedCharacterPosition;
        
        // Properties
        public UnityEngine.UI.Graphic targetGraphic { get; }
        public Coffee.UIExtensions.UIGradient.Direction direction { get; set; }
        public UnityEngine.Color color1 { get; set; }
        public UnityEngine.Color color2 { get; set; }
        public UnityEngine.Color color3 { get; set; }
        public UnityEngine.Color color4 { get; set; }
        public float rotation { get; set; }
        public float offset { get; set; }
        public UnityEngine.Vector2 offset2 { get; set; }
        public Coffee.UIExtensions.UIGradient.GradientStyle gradientStyle { get; set; }
        public UnityEngine.ColorSpace colorSpace { get; set; }
        public bool ignoreAspectRatio { get; set; }
        
        // Methods
        public UnityEngine.UI.Graphic get_targetGraphic()
        {
            return this.graphic;
        }
        public Coffee.UIExtensions.UIGradient.Direction get_direction()
        {
            return (Coffee.UIExtensions.UIGradient.Coffee.UIExtensions.UIGradient.Direction)this.m_Direction;
        }
        public void set_direction(Coffee.UIExtensions.UIGradient.Direction value)
        {
            if(this.m_Direction == value)
            {
                    return;
            }
            
            this.m_Direction = value;
            UnityEngine.UI.Graphic val_1 = this.graphic;
            goto typeof(UnityEngine.UI.Graphic).__il2cppRuntimeField_2F8;
        }
        public UnityEngine.Color get_color1()
        {
            return new UnityEngine.Color() {r = this.m_Color1};
        }
        public void set_color1(UnityEngine.Color value)
        {
            UnityEngine.Color val_7 = this.m_Color1;
            val_7 = val_7 - value.r;
            float val_1 = S5 - value.g;
            val_7 = val_7 * val_7;
            val_1 = val_1 * val_1;
            val_7 = val_7 + val_1;
            float val_2 = S6 - value.b;
            val_2 = val_2 * val_2;
            val_7 = val_2 + val_7;
            val_7 = ((S7 - value.a) * (S7 - value.a)) + val_7;
            if(val_7 < 0)
            {
                    return;
            }
            
            this.m_Color1 = value;
            mem[1152921504930430440] = value.g;
            mem[1152921504930430444] = value.b;
            mem[1152921504930430448] = value.a;
            UnityEngine.UI.Graphic val_5 = this.graphic;
            goto typeof(UnityEngine.UI.Graphic).__il2cppRuntimeField_2F8;
        }
        public UnityEngine.Color get_color2()
        {
            return new UnityEngine.Color() {r = this.m_Color2};
        }
        public void set_color2(UnityEngine.Color value)
        {
            UnityEngine.Color val_7 = this.m_Color2;
            val_7 = val_7 - value.r;
            float val_1 = S5 - value.g;
            val_7 = val_7 * val_7;
            val_1 = val_1 * val_1;
            val_7 = val_7 + val_1;
            float val_2 = S6 - value.b;
            val_2 = val_2 * val_2;
            val_7 = val_2 + val_7;
            val_7 = ((S7 - value.a) * (S7 - value.a)) + val_7;
            if(val_7 < 0)
            {
                    return;
            }
            
            this.m_Color2 = value;
            mem[1152921504930430456] = value.g;
            mem[1152921504930430460] = value.b;
            mem[1152921504930430464] = value.a;
            UnityEngine.UI.Graphic val_5 = this.graphic;
            goto typeof(UnityEngine.UI.Graphic).__il2cppRuntimeField_2F8;
        }
        public UnityEngine.Color get_color3()
        {
            return new UnityEngine.Color() {r = this.m_Color3};
        }
        public void set_color3(UnityEngine.Color value)
        {
            UnityEngine.Color val_7 = this.m_Color3;
            val_7 = val_7 - value.r;
            float val_1 = S5 - value.g;
            val_7 = val_7 * val_7;
            val_1 = val_1 * val_1;
            val_7 = val_7 + val_1;
            float val_2 = S6 - value.b;
            val_2 = val_2 * val_2;
            val_7 = val_2 + val_7;
            val_7 = ((S7 - value.a) * (S7 - value.a)) + val_7;
            if(val_7 < 0)
            {
                    return;
            }
            
            this.m_Color3 = value;
            mem[1152921504930430472] = value.g;
            mem[1152921504930430476] = value.b;
            mem[1152921504930430480] = value.a;
            UnityEngine.UI.Graphic val_5 = this.graphic;
            goto typeof(UnityEngine.UI.Graphic).__il2cppRuntimeField_2F8;
        }
        public UnityEngine.Color get_color4()
        {
            return new UnityEngine.Color() {r = this.m_Color4};
        }
        public void set_color4(UnityEngine.Color value)
        {
            UnityEngine.Color val_7 = this.m_Color4;
            val_7 = val_7 - value.r;
            float val_1 = S5 - value.g;
            val_7 = val_7 * val_7;
            val_1 = val_1 * val_1;
            val_7 = val_7 + val_1;
            float val_2 = S6 - value.b;
            val_2 = val_2 * val_2;
            val_7 = val_2 + val_7;
            val_7 = ((S7 - value.a) * (S7 - value.a)) + val_7;
            if(val_7 < 0)
            {
                    return;
            }
            
            this.m_Color4 = value;
            mem[1152921504930430488] = value.g;
            mem[1152921504930430492] = value.b;
            mem[1152921504930430496] = value.a;
            UnityEngine.UI.Graphic val_5 = this.graphic;
            goto typeof(UnityEngine.UI.Graphic).__il2cppRuntimeField_2F8;
        }
        public float get_rotation()
        {
            if(this.m_Direction == 0)
            {
                    return -90f;
            }
            
            if(this.m_Direction != 1)
            {
                    return (float)this.m_Rotation;
            }
            
            return 0f;
        }
        public void set_rotation(float value)
        {
            float val_10 = value;
            float val_10 = System.Math.Abs(this.m_Rotation);
            float val_11 = System.Math.Abs(val_10 = value);
            float val_12 = 1E-06f;
            val_12 = ((val_10 > val_11) ? (val_10) : (val_11)) * val_12;
            float val_13 = 8f;
            val_13 = mem[536889545] * val_13;
            float val_3 = (val_12 > val_13) ? (val_12) : (val_13);
            if((val_10 ?? this.m_Rotation) < 0)
            {
                    return;
            }
            
            this.m_Rotation = val_10;
            UnityEngine.UI.Graphic val_4 = this.graphic;
            val_10 = ???;
            goto typeof(UnityEngine.UI.Graphic).__il2cppRuntimeField_2F8;
        }
        public float get_offset()
        {
            return (float)this.m_Offset1;
        }
        public void set_offset(float value)
        {
            if(this.m_Offset1 == value)
            {
                    return;
            }
            
            this.m_Offset1 = value;
            UnityEngine.UI.Graphic val_1 = this.graphic;
            goto typeof(UnityEngine.UI.Graphic).__il2cppRuntimeField_2F8;
        }
        public UnityEngine.Vector2 get_offset2()
        {
            return (UnityEngine.Vector2)this;
        }
        public void set_offset2(UnityEngine.Vector2 value)
        {
            if(this.m_Offset1 == S1)
            {
                    if(this.m_Offset2 == S0)
            {
                    return;
            }
            
            }
            
            this.m_Offset1 = ;
            this.m_Offset2 = ;
            UnityEngine.UI.Graphic val_1 = this.graphic;
            goto typeof(UnityEngine.UI.Graphic).__il2cppRuntimeField_2F8;
        }
        public Coffee.UIExtensions.UIGradient.GradientStyle get_gradientStyle()
        {
            return (Coffee.UIExtensions.UIGradient.Coffee.UIExtensions.UIGradient.GradientStyle)this.m_GradientStyle;
        }
        public void set_gradientStyle(Coffee.UIExtensions.UIGradient.GradientStyle value)
        {
            if(this.m_GradientStyle == value)
            {
                    return;
            }
            
            this.m_GradientStyle = value;
            UnityEngine.UI.Graphic val_1 = this.graphic;
            goto typeof(UnityEngine.UI.Graphic).__il2cppRuntimeField_2F8;
        }
        public UnityEngine.ColorSpace get_colorSpace()
        {
            return (UnityEngine.ColorSpace)this.m_ColorSpace;
        }
        public void set_colorSpace(UnityEngine.ColorSpace value)
        {
            if(this.m_ColorSpace == value)
            {
                    return;
            }
            
            this.m_ColorSpace = value;
            UnityEngine.UI.Graphic val_1 = this.graphic;
            goto typeof(UnityEngine.UI.Graphic).__il2cppRuntimeField_2F8;
        }
        public bool get_ignoreAspectRatio()
        {
            return (bool)this.m_IgnoreAspectRatio;
        }
        public void set_ignoreAspectRatio(bool value)
        {
            bool val_1 = value;
            if(this.m_IgnoreAspectRatio == val_1)
            {
                    return;
            }
            
            this.m_IgnoreAspectRatio = val_1;
            UnityEngine.UI.Graphic val_2 = this.graphic;
            goto typeof(UnityEngine.UI.Graphic).__il2cppRuntimeField_2F8;
        }
        public override void ModifyMesh(UnityEngine.UI.VertexHelper vh)
        {
            float val_6;
            float val_7;
            var val_30;
            var val_63;
            float val_65;
            float val_66;
            float val_67;
            float val_68;
            var val_69;
            float val_70;
            float val_71;
            float val_72;
            float val_73;
            float val_74;
            float val_75;
            float val_76;
            float val_78;
            var val_79;
            float val_80;
            float val_81;
            long val_83;
            float val_84;
            var val_85;
            long val_87;
            float val_88;
            var val_89;
            long val_90;
            float val_91;
            var val_92;
            if(this.IsActive() == false)
            {
                    return;
            }
            
            UnityEngine.UI.Graphic val_2 = this.graphic;
            UnityEngine.Rect val_5 = this.graphic.rectTransform.rect;
            if(this.m_Direction == 0)
            {
                goto label_7;
            }
            
            if(this.m_Direction != 1)
            {
                goto label_8;
            }
            
            val_65 = 0f;
            goto label_10;
            label_7:
            val_65 = -1.570796f;
            goto label_10;
            label_8:
            val_65 = this.m_Rotation * 0.01745329f;
            label_10:
            val_66 = val_6;
            val_67 = val_7;
            if((this.m_Direction >= 2) && (this.m_IgnoreAspectRatio != true))
            {
                    float val_9 = val_5.m_XMin.width;
                val_68 = val_5.m_XMin.height / val_9;
                val_66 = val_66 * val_68;
                val_9 = val_66 * val_66;
                val_9 = (val_67 * val_67) + val_9;
                if(val_9 > (1E-05f))
            {
                    val_66 = val_66 / val_9;
                val_67 = val_67 / val_9;
            }
            else
            {
                    val_66 = mem[mem[536895699]];
                val_66 = mem[536895699];
                val_67 = mem[mem[536895699] + 4];
                val_67 = mem[536895699] + 4;
            }
            
            }
            
            float val_60 = val_67;
            Coffee.UIExtensions.UIGradient.Coffee.UIExtensions.UIGradient.Matrix2x3 val_11 = new Coffee.UIExtensions.UIGradient.Coffee.UIExtensions.UIGradient.Matrix2x3(rect:  new UnityEngine.Rect() {m_XMin = val_5.m_XMin, m_YMin = val_5.m_YMin, m_Width = val_5.m_Width, m_Height = val_5.m_Height}, cos:  val_66, sin:  val_60);
            if(vh.currentVertCount < 1)
            {
                    return;
            }
            
            val_63 = 27357216;
            var val_73 = 0;
            label_54:
            vh.PopulateUIVertex(vertex:  new UnityEngine.UIVertex() {position = new UnityEngine.Vector3() {x = 0f, y = 0f, z = 0f}, normal = new UnityEngine.Vector3() {x = 0f, y = 0f, z = 0f}, tangent = new UnityEngine.Vector4() {x = 0f, y = 0f, z = 0f, w = 0f}, color = new UnityEngine.Color32(), uv0 = new UnityEngine.Vector4() {x = 0f, y = 0f, z = 0f, w = 0f}, uv1 = new UnityEngine.Vector4() {x = 0f, y = 0f, z = 0f, w = 0f}, uv2 = new UnityEngine.Vector4() {x = 0f, y = 0f, z = 0f, w = 0f}, uv3 = new UnityEngine.Vector4() {x = 0f, y = 0f, z = 0f, w = 0f}}, i:  0);
            if(this.m_GradientStyle != 2)
            {
                goto label_20;
            }
            
            val_69 = 536894823;
            if(mem[536895047] == 0)
            {
                    val_69 = 536894823;
            }
            
            var val_54 = mem[536895007];
            if((val_73 & 3) >= (mem[536895007] + 24))
            {
                goto label_23;
            }
            
            val_54 = val_54 + (((0 & 3)) << 3);
            val_70 = mem[(mem[536895007] + ((0 & 3)) << 3) + 32];
            val_70 = (mem[536895007] + ((0 & 3)) << 3) + 32;
            val_71 = val_54 + 36;
            goto label_24;
            label_20:
            val_70 = 0f;
            val_71;
            label_24:
            float val_55 = val_11.m10;
            float val_56 = val_11.m11;
            val_55 = val_55 * val_70;
            val_56 = val_56 * val_71;
            val_55 = val_55 + val_56;
            float val_61 = val_11.m12;
            val_55 = val_61 + val_55;
            float val_14 = this.m_Offset1 + val_55;
            if(this.m_Direction == 3)
            {
                    UnityEngine.Color val_58 = this.m_Color1;
                UnityEngine.Color val_57 = this.m_Color2;
                val_70 = val_11.m00 * val_70;
                val_57 = val_57 - val_58;
                float val_15 = S16 - val_60;
                val_71 = val_11.m01 * val_71;
                val_70 = val_70 + val_71;
                float val_62 = val_11.m02;
                val_70 = val_62 + val_70;
                val_70 = this.m_Offset2 + val_70;
                val_57 = val_70 * val_57;
                val_58 = val_58 + val_57;
                val_15 = val_70 * val_15;
                UnityEngine.Color val_59 = this.m_Color4;
                val_72 = val_60 + val_15;
                val_57 = val_57 - V18.2S;
                val_59 = val_59 - this.m_Color3;
                val_60 = val_60 - val_62;
                val_59 = val_70 * val_59;
                val_60 = val_70 * val_60;
                val_59 = this.m_Color3 + val_59;
                val_61 = val_61 + (V7.2S - val_61);
                val_70 = val_15 + val_70;
                val_59 = val_59 - val_58;
                val_70 = val_70 - val_61;
                val_62 = val_62 + val_60;
                val_59 = val_14 * val_59;
                val_73 = val_58 + val_59;
                val_74 = val_61 + val_70;
                val_75 = val_62 - val_72;
            }
            else
            {
                    UnityEngine.Color val_63 = this.m_Color1;
                val_63 = val_63 - this.m_Color2;
                val_55 = val_61 - val_55;
                val_63 = val_14 * val_63;
                val_73 = this.m_Color2 + val_63;
                val_74 = val_60 + this.m_Color2;
                val_75 = val_70 - S19;
            }
            
            float val_66 = 255f;
            if(this.m_ColorSpace == 0)
            {
                goto label_27;
            }
            
            if(this.m_ColorSpace != 1)
            {
                goto label_28;
            }
            
            val_73 = UnityEngine.Mathf.GammaToLinearSpace(value:  val_73);
            val_76 = val_74;
            float val_21 = UnityEngine.Mathf.GammaToLinearSpace(value:  val_76);
            float val_22 = UnityEngine.Mathf.GammaToLinearSpace(value:  val_74);
            goto label_29;
            label_27:
            val_73 = UnityEngine.Mathf.LinearToGammaSpace(value:  val_73);
            val_76 = val_74;
            float val_24 = UnityEngine.Mathf.LinearToGammaSpace(value:  val_76);
            label_29:
            label_28:
            float val_27 = 0f / val_66;
            float val_64 = 255f;
            val_64 = 1f * val_64;
            float val_29 = (((((float)0 & 255) / val_66) * val_73) >= 0) ? (val_64) : 0f;
            if(val_29 >= 0f)
            {
                goto label_30;
            }
            
            val_78 = ???;
            if((double)val_29 != (-0.5))
            {
                goto label_31;
            }
            
            val_79 = val_30;
            val_80 = -1f;
            goto label_32;
            label_30:
            val_78 = ???;
            if((double)val_29 != 0.5)
            {
                goto label_33;
            }
            
            val_79 = val_30;
            val_80 = 1f;
            label_32:
            val_81 = (float)val_79;
            val_80 = val_81 + val_80;
            var val_31 = (((long)val_79 & 1) != 0) ? (val_81) : (val_80);
            goto label_35;
            label_31:
            val_81 = val_29 + (-0.5f);
            goto label_35;
            label_33:
            val_81 = val_29 + 0.5f;
            label_35:
            float val_65 = UnityEngine.Mathf.LinearToGammaSpace(value:  val_74);
            val_65 = val_65 * 255f;
            float val_33 = (0f >= 0) ? (val_65) : 0f;
            val_66 = 0f / val_66;
            if(val_33 >= 0f)
            {
                goto label_36;
            }
            
            if((double)val_33 != (-0.5))
            {
                goto label_37;
            }
            
            val_83 = (long)val_30;
            val_84 = (float)val_30;
            val_85 = val_84 + (-1f);
            goto label_38;
            label_36:
            if((double)val_33 != 0.5)
            {
                goto label_39;
            }
            
            val_83 = (long)val_30;
            val_84 = (float)val_30;
            val_85 = val_84 + 1f;
            label_38:
            var val_34 = ((val_83 & 1) != 0) ? (val_84) : (val_85);
            goto label_41;
            label_37:
            float val_67 = -0.5f;
            val_67 = val_33 + val_67;
            goto label_41;
            label_39:
            float val_68 = 0.5f;
            val_68 = val_33 + val_68;
            label_41:
            val_68 = val_68 * 255f;
            float val_35 = ((0f / val_66) >= 0) ? (val_68) : 0f;
            if(val_35 >= 0f)
            {
                goto label_42;
            }
            
            if((double)val_35 != (-0.5))
            {
                goto label_43;
            }
            
            val_87 = (long)val_30;
            val_88 = (float)val_30;
            val_89 = val_88 + (-1f);
            goto label_44;
            label_42:
            if((double)val_35 != 0.5)
            {
                goto label_45;
            }
            
            val_87 = (long)val_30;
            val_88 = (float)val_30;
            val_89 = val_88 + 1f;
            label_44:
            var val_37 = ((val_87 & 1) != 0) ? (val_88) : (val_89);
            goto label_47;
            label_43:
            float val_69 = -0.5f;
            val_69 = val_35 + val_69;
            goto label_47;
            label_45:
            float val_70 = 0.5f;
            val_70 = val_35 + val_70;
            label_47:
            val_70 = val_70 * 255f;
            float val_38 = (((val_78 + (val_14 * val_75)) * val_66) >= 0) ? (val_70) : 0f;
            if(val_38 >= 0f)
            {
                goto label_48;
            }
            
            if((double)val_38 != (-0.5))
            {
                goto label_49;
            }
            
            val_90 = (long)val_30;
            val_91 = (float)val_30;
            val_92 = val_91 + (-1f);
            goto label_50;
            label_48:
            if((double)val_38 != 0.5)
            {
                goto label_51;
            }
            
            val_90 = (long)val_30;
            val_91 = (float)val_30;
            val_92 = val_91 + 1f;
            label_50:
            val_91 = ((val_90 & 1) != 0) ? (val_91) : (val_92);
            goto label_53;
            label_49:
            float val_71 = -0.5f;
            val_71 = val_38 + val_71;
            goto label_53;
            label_51:
            float val_72 = 0.5f;
            val_72 = val_38 + val_72;
            label_53:
            byte val_40 = (0f < 0) ? 0 : 0;
            val_40 = val_40 & 255;
            var val_41 = (val_35 < 0) ? ((int)val_35) : ((int)val_35);
            val_41 = val_41 & 255;
            vh.SetUIVertex(vertex:  new UnityEngine.UIVertex() {position = new UnityEngine.Vector3(), normal = new UnityEngine.Vector3(), tangent = new UnityEngine.Vector4(), color = new UnityEngine.Color32(), uv0 = new UnityEngine.Vector4(), uv1 = new UnityEngine.Vector4(), uv2 = new UnityEngine.Vector4(), uv3 = new UnityEngine.Vector4()}, i:  0);
            val_73 = val_73 + 1;
            if(val_73 < vh.currentVertCount)
            {
                goto label_54;
            }
            
            return;
            label_23:
        }
        public UIGradient()
        {
            this.m_Color1 = 1;
            this.m_Color2 = 1;
            this.m_Color3 = 1;
            this.m_Color4 = 1;
            this.m_ColorSpace = 0;
            this.m_IgnoreAspectRatio = true;
        }
        private static UIGradient()
        {
            var val_1 = mem[536881667];
            if(val_1 == 0)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881675] = mem[536895699] + 16;
            val_1 = mem[536881667];
            if(val_1 <= 1)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881683] = mem[536895699] + 8;
            val_1 = mem[536881667];
            if(val_1 <= 2)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881691] = mem[536895699] + 40;
            val_1 = mem[536881667];
            if(val_1 <= 3)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881699] = mem[536895699];
            mem2[0] = 536881643;
            throw new NullReferenceException();
        }
    
    }

}
